Skip to content

KC-1368: Add gchat-app-setup for Google Chat integration - #2252

Open
sshrushanth-ks wants to merge 3 commits into
gchat-integrationfrom
gchat-integration-int
Open

KC-1368: Add gchat-app-setup for Google Chat integration#2252
sshrushanth-ks wants to merge 3 commits into
gchat-integrationfrom
gchat-integration-int

Conversation

@sshrushanth-ks

Copy link
Copy Markdown
Contributor

Summary

Added a Commander setup command for Google Chat Service Mode, parallel to slack-app-setup / teams-app-setup. It provisions Docker/KSM resources, collects Google Chat and Pub/Sub credentials, stores them on a vault config record, and generates docker-compose.yml for commander-gchat + gchat-app.

Changes

  • Added gchat-app-setup command with Phase 1 Docker/KSM setup and Phase 2 Google Chat credential collection
  • Added GChatConfig and vault field contract: google_service_account_json, google_project_id, google_topic_id, google_subscription_id, chat_approvals_space_id, and slash-command IDs for record/folder/one-time-share
  • Validated service-account JSON from a file path only (required SA keys + type=service_account); rejected unreliable inline JSON paste
  • Normalized Pub/Sub topic/subscription short IDs and full resource paths; required chat space IDs to start with spaces/
  • Supported optional EPM and SSO Cloud device-approval flags on the vault record (same pattern as Slack/Teams)
  • Generated docker-compose.yml with keeper/gchat-app:latest and GCHAT_RECORD / COMMANDER_RECORD / KSM_CONFIG env wiring
  • Added get_integration_display_name so UI text shows “Google Chat” while docker/env naming stays gchat
  • Registered gchat-app-setup in start_service.py and command_categories.py; documented setup and field contract in service README.md
  • Added unit tests in test_gchat_app_setup.py for naming, SA/file validation, Pub/Sub normalization, space IDs, and record field labels

Collect and store Google Chat/Pub/Sub credentials in a vault record and generate docker-compose, matching the Slack/Teams setup flow.
Drop unreliable inline JSON paste at the gchat-app-setup prompt; service account keys are too large for single-line terminal input.
@sshrushanth-ks sshrushanth-ks self-assigned this Jul 30, 2026
@sshrushanth-ks
sshrushanth-ks marked this pull request as ready for review July 30, 2026 11:44
import json
import os
import re
from typing import Any

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use any(), avoid using typing

"""Google Chat App integration setup."""

def get_integration_name(self):
return 'GChat'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

create Constants

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants